# $Id: PKGBUILD 81302 2012-12-16 19:36:55Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>

pkgname=esmska
pkgver=1.3
pkgrel=1
pkgdesc="Program for sending SMS over the Internet"
arch=('any')
url="http://esmska.googlecode.com/"
license=('AGPL')
depends=('java-runtime' 'desktop-file-utils')
install=$pkgname.install
changelog=$pkgname.changelog
source=(http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.gz \
        $pkgname.desktop)
sha256sums=('e21031c9c3cb2621df6af4408df97508ef0ccc4391a70d2297531149102373df'
            'b7083495c3bb12f31b4451dd112973eed852cb969c049928777e486f9a3f9387')

package() {
  cd ${srcdir}/$pkgname-$pkgver

  install -d ${pkgdir}/usr/share/java/$pkgname
  cp -a * ${pkgdir}/usr/share/java/$pkgname

#.desktop + icon files
  install -D -m644 ${srcdir}/$pkgname.desktop \
    ${pkgdir}/usr/share/applications/$pkgname.desktop
  install -D -m644 ${srcdir}/$pkgname-$pkgver/icons/$pkgname.png \
    ${pkgdir}/usr/share/pixmaps/$pkgname.png

#executable file
  install -d ${pkgdir}/usr/bin
  ln -s /usr/share/java/$pkgname/$pkgname.sh \
    ${pkgdir}/usr/bin/$pkgname

#licenses
  install -D -m644 ${srcdir}/$pkgname-$pkgver/license/license.txt \
    ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
  install -D -m644 ${srcdir}/$pkgname-$pkgver/license/gnu-agpl.txt \
    ${pkgdir}/usr/share/licenses/$pkgname/AGPL

#removing unneeded
  rm ${pkgdir}/usr/share/java/$pkgname/$pkgname.exe
}
